#pragma once



#ifndef Q_OS_WIN32

    #include <string>
    #include <list>
    using std::string;
    using std::list;

    #ifdef DATABASE_DLL_EXPORTS
    #define DATABASE_DLL_API __declspec(dllexport)
    #else
    #define DATABASE_DLL_API __declspec(dllimport)
    #endif

    typedef unsigned long ULONG;

    typedef unsigned char BYTE;


    //Êý¾Ý¿â³éÏó½Ó¿Ú
    class DATABASE_DLL_API  CxDBInterface
    {
    public:
        virtual ~CxDBInterface(){}
        //ÍÆÈëÍ¼Ïñ
        virtual	void	PushImage(BYTE *,ULONG )=0;
        virtual	BYTE*	PopImage(ULONG	,ULONG	)=0;
        virtual	ULONG	Query()=0;
    };



    bool	DATABASE_DLL_API	__stdcall CxDBGetInstance(int ,CxDBInterface **);

    bool	DATABASE_DLL_API	__stdcall CxDBCreateInstance(size_t );

    bool	DATABASE_DLL_API	__stdcall CxDBUnInstance(size_t );

    bool	DATABASE_DLL_API	__stdcall PushImage(size_t ,BYTE *,ULONG );

    bool	DATABASE_DLL_API	__stdcall CxDBReleaseInstance(CxDBInterface **);

    bool	DATABASE_DLL_API	__stdcall CxDBConnectDB(const string &);


#else
    class   CxDBInterface
    {
    public:
        virtual ~CxDBInterface(){}
        //ÍÆÈëÍ¼Ïñ
        virtual	void	PushImage(BYTE *,ULONG )=0;
        virtual	BYTE*	PopImage(ULONG	,ULONG	)=0;
        virtual	ULONG	Query()=0;
    };


    bool		 CxDBGetInstance(int ,CxDBInterface **)
    {
        return false;
    }

    bool		 CxDBCreateInstance(size_t )
    {
        return false;
    }

    bool		 CxDBUnInstance(size_t )
    {
        return false;
    }

    bool		 PushImage(size_t ,BYTE *,ULONG )
    {
        return false;
    }

    bool		 CxDBReleaseInstance(CxDBInterface **)
    {
        return false;
    }

    bool		 CxDBConnectDB(const string &)
    {
        return false;
    }


#endif


